package com.dit.sanasa_sme_vaadin;

import javax.servlet.annotation.WebServlet;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.dit.action.dashboard.DashboardView;
import com.dit.action.policy.PolicyDetailsView;
import com.dit.action.signIn.SignInView;
import com.vaadin.annotations.Theme;
import com.vaadin.annotations.VaadinServletConfiguration;
import com.vaadin.navigator.Navigator;
import com.vaadin.server.VaadinRequest;
import com.vaadin.server.VaadinServlet;
import com.vaadin.ui.UI;

@SuppressWarnings("serial")
@Theme("sanasa_sme_vaadin")
@Component
@Scope("prototype")
public class Sanasa_sme_vaadinUI extends UI {
	
	/*@Autowired
	private UserService userService;*/
	
	private static final long serialVersionUID = 1L;

	@WebServlet(value = "/*", asyncSupported = true)
	@VaadinServletConfiguration(productionMode = false, ui = Sanasa_sme_vaadinUI.class)
	public static class Servlet extends VaadinServlet {
			
		
	}

	@Override
	protected void init(VaadinRequest request) {
		
		new Navigator(this, this);
		getNavigator().addView(SignInView.NAME, SignInView.class);
		getNavigator().addView(DashboardView.NAME, DashboardView.class);
		
//		getNavigator().addView(PolicyDetailsView.NAME, PolicyDetailsView.class);
		
		
				
	}
	
	

}